// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IChessboard.cs" company="">
//   
// </copyright>
//  <summary>
//   The Chessboard interface.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace Shatranj
{
    using System.Collections.Generic;
    using System.Collections.ObjectModel;

    /// <summary>
    /// The Chessboard interface.
    /// </summary>
    public interface IChessboard
    {
        ///// <summary>
        ///// TODO: Might have to be part of ViewModel
        ///// </summary>
        // bool Animate { get; set;}
        #region Public Properties

        /// <summary>
        /// Gets or sets the active square.
        /// </summary>
        BoardSquare ActiveSquare { get; set; }

        /// <summary>
        /// Gets the all squares.
        /// </summary>
        ObservableCollection<BoardSquare> AllSquares { get; }

        /// <summary>
        /// Gets or sets the captured pieces.
        /// </summary>
        IDictionary<Army, ChessPiece> CapturedPieces { get; set; }

        /// <summary>
        /// Gets or sets the current turn.
        /// </summary>
        Turn CurrentTurn { get; set; }

        /// <summary>
        /// Gets or sets the files.
        /// </summary>
        BoardFile[] Files { get; set; }

        /// <summary>
        /// Gets or sets the squares.
        /// </summary>
        BoardSquare[,] Squares { get; set; }

        #endregion

        #region Public Indexers

        /// <summary>
        /// The this.
        /// </summary>
        /// <param name="position">
        /// The position.
        /// </param>
        /// <returns>
        /// The <see cref="BoardSquare"/>.
        /// </returns>
        BoardSquare this[string position] { get; set; }

        #endregion

        #region Public Methods and Operators

        /// <summary>
        /// The layout pieces.
        /// </summary>
        void LayoutPieces();

        /// <summary>
        /// The make move.
        /// </summary>
        /// <param name="source">
        /// The source.
        /// </param>
        /// <param name="target">
        /// The target.
        /// </param>
        void MakeMove(BoardLocation source, BoardLocation target);

        /// <summary>
        /// The make move.
        /// </summary>
        /// <param name="sourceAlgebraicNotation">
        /// The source algebraic notation.
        /// </param>
        /// <param name="targetAlgebraicNotation">
        /// The target algebraic notation.
        /// </param>
        void MakeMove(string sourceAlgebraicNotation, string targetAlgebraicNotation);

        /// <summary>
        /// The make move.
        /// </summary>
        /// <param name="piece">
        /// The piece.
        /// </param>
        /// <param name="target">
        /// The target.
        /// </param>
        void MakeMove(ChessPiece piece, BoardLocation target);

        /// <summary>
        /// The prepare to move.
        /// </summary>
        /// <param name="piece">
        /// The piece.
        /// </param>
        void PrepareToMove(ChessPiece piece);

        #endregion
    }
}